﻿CREATE PROCEDURE [dbo].[UpdateQuoteLIOffer_SP] 
    @BillingDiscount float,
    @BillingCurrency nvarchar(50),
    @BillingPrice float,
    @QuoteLineItemID int,
@DiscountPerc float,
@Offer float,
    @QuoteID int,
	@error nvarchar(4000) = null OUTPUT
AS
	SET NOCOUNT ON;
BEGIN
	BEGIN TRY
		BEGIN TRANSACTION
    -- Insert statements for procedure here
	Update QuoteLineItem_Tbl set BillingDiscount = @BillingDiscount, 
BillingCurrency = @BillingCurrency, 
BillingPrice=@BillingPrice,  Discount=@DiscountPerc
 where QuoteLineItemID = @QuoteLineItemID

Update Quote_Tbl set OfferedValue=@Offer where quoteID=@QuoteID

		COMMIT TRANSACTION
	END TRY
	
	BEGIN CATCH
		IF @@ERROR <> 0
		ROLLBACK TRANSACTION
		SET @error=ERROR_MESSAGE()
		
	END CATCH
END